<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

// Admin 模块
Route::group(['namespace' => 'Admin', 'prefix' => 'admin'], function () {
    Route::get('/', 'HomeController@index');
});


// Api 模块
Route::group(['namespace' => 'Api', 'prefix' => 'api'], function () {
    // v1 版本
    Route::group(['namespace' => 'v1', 'prefix' => 'v1'], function () {
        // 红包模块
        Route::post('sendRedpack', 'WechatRedpackController@send');

        // 登录测试
        Route::post('checkLogin','LoginController@checkLogin');
    });
    
    
});